<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>My JSP 'index.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<link href="http://apps.bdimg.com/libs/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet">  
</head>

<body>
	This is my first springMvcDemo
	<br> welcome ${user.userName} password ${user.password }
<div class="divider"></div>	
		<table class="table table-striped">
  <caption style="text-align: center;">获取所有用户信息</caption>
  <thead>
    <tr>
      <th>id</th>
      <th>用户名</th>
      <th>密码</th>
    </tr>
  </thead>
  <tbody>
  <c:forEach items="${userList}" var="p">
    <tr> 	
    <td>${p.id}</td>
			<td>${p.userName}</td>
			<td>${p.password}</td>
			<td>
				<a href="${pageContext.request.contextPath}/user/delete?id=${p.id}">删除</a>
			</td>
    </tr>
    </c:forEach>
  </tbody>
</table>
	<a href="comment.jsp">添加评论</a>
</body>
</html>
